<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        div {
            width: 360px;
            position: relative;
            margin: 0 auto;
        }

        p {
            position: absolute;
            top: 0;
            right: 0;
        }
    </style>
</head>

<body>
    <div>
        <p>这是广告</p>
        <img src="/imgs/timthumb(1).jpg" alt="" srcset="">
    </div>
    <script>
        let div = document.querySelector('div')
            setTimeout(function () {
                div.style.display = 'none'
            },5000)
    </script>
</body>

</html>